home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 February: Tool Chest / Dev.CD Feb 95 / Dev.CD Feb 95.toast / Tool Chest / Interfaces / Universal Interfaces 2.0a3 / Universal AIncludes / FSM.a < prev    next >
Encoding:
Text File  |  1994-11-11  |  27.2 KB  |  1,017 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        FSM.a
  3. ;
  4. ;    Copyright:    © 1984-1994 by Apple Computer, Inc.
  5. ;                All rights reserved.
  6. ;
  7. ;    Version:    Universal Interfaces 2.0a3  ETO #16, MPW prerelease.  Friday, November 11, 1994. 
  8. ;
  9. ;    Bugs?:        If you find a problem with this file, send the file and version
  10. ;                information (from above) and the problem description to:
  11. ;
  12. ;                    Internet:    apple.bugs@applelink.apple.com
  13. ;                    AppleLink:    APPLE.BUGS
  14. ;
  15. ;
  16.  
  17.     IF &TYPE('__FSM__') = 'UNDEFINED' THEN
  18. __FSM__ SET 1
  19.  
  20.  
  21.     IF &TYPE('__FILES__') = 'UNDEFINED' THEN
  22.     include 'Files.a'
  23.     ENDIF
  24. ;        include 'Types.a'                                            ;
  25. ;            include 'ConditionalMacros.a'                            ;
  26. ;        include 'MixedMode.a'                                        ;
  27. ;        include 'OSUtils.a'                                        ;
  28. ;            include 'Memory.a'                                        ;
  29.  
  30. ;    The new volume mount flags 
  31. volMountInteractBit                EQU        15                    ; Input to VolumeMount: If set, it's OK for the file system 
  32. volMountInteractMask            EQU        $8000                ; to perform user interaction to mount the volume 
  33. volMountChangedBit                EQU        14                    ; Output from VoumeMount: If set, the volume was mounted, but 
  34. volMountChangedMask                EQU        $4000                ; the volume mounting information record needs to be updated. 
  35. volMountFSReservedMask            EQU        $00ff                ; bits 0-7 are defined by each file system for its own use 
  36. volMountSysReservedMask            EQU        $ff00                ; bits 8-15 are reserved for Apple system use 
  37.  
  38. ;
  39. ; * The new volume mount info record
  40. VolumeMountInfoHeader     RECORD    0
  41. length                     ds.w    1                                    ; length of location data (including self) 
  42. media                     ds.l    1                                    ; type of media (must be registered with Apple) 
  43. flags                     ds.w    1                                    ; volume mount flags. Variable length data follows 
  44. sizeof                     EQU    8
  45.                         ENDR
  46.  
  47.  
  48. gestaltFSMVersion                EQU        'fsm '
  49.  
  50. ;
  51. ; * Miscellaneous file system values not in Files.h
  52. fsUsrCNID                        EQU        16                    ; First assignable directory or file number 
  53. ;    File system trap word attribute bits 
  54. kHFSBit                            EQU        9                    ; HFS call: bit 9 
  55. kHFSMask                        EQU        $0200
  56. kAsyncBit                        EQU        10                    ; Asynchronous call: bit 10 
  57. kAsyncMask                        EQU        $0400
  58.  
  59. ;
  60. ; * HFSCIProc selectCode values
  61. ; * Note: The trap attribute bits (the HFS bit and the asynchronous bit)
  62. ; * may be set in these selectCode values.
  63. kFSMOpen                        EQU        $A000
  64. kFSMClose                        EQU        $A001
  65. kFSMRead                        EQU        $A002
  66. kFSMWrite                        EQU        $A003
  67. kFSMGetVolInfo                    EQU        $A007
  68. kFSMCreate                        EQU        $A008
  69. kFSMDelete                        EQU        $A009
  70. kFSMOpenRF                        EQU        $A00A
  71. kFSMRename                        EQU        $A00B
  72. kFSMGetFileInfo                    EQU        $A00C
  73. kFSMSetFileInfo                    EQU        $A00D
  74. kFSMUnmountVol                    EQU        $A00E
  75. kFSMMountVol                    EQU        $A00F
  76. kFSMAllocate                    EQU        $A010
  77. kFSMGetEOF                        EQU        $A011
  78. kFSMSetEOF                        EQU        $A012
  79. kFSMFlushVol                    EQU        $A013
  80. kFSMGetVol                        EQU        $A014
  81. kFSMSetVol                        EQU        $A015
  82. kFSMEject                        EQU        $A017
  83. kFSMGetFPos                        EQU        $A018
  84. kFSMOffline                        EQU        $A035
  85. kFSMSetFilLock                    EQU        $A041
  86. kFSMRstFilLock                    EQU        $A042
  87. kFSMSetFilType                    EQU        $A043
  88. kFSMSetFPos                        EQU        $A044
  89. kFSMFlushFile                    EQU        $A045
  90. ;    The File System HFSDispatch selectCodes 
  91. kFSMOpenWD                        EQU        $0001
  92. kFSMCloseWD                        EQU        $0002
  93. kFSMCatMove                        EQU        $0005
  94. kFSMDirCreate                    EQU        $0006
  95. kFSMGetWDInfo                    EQU        $0007
  96. kFSMGetFCBInfo                    EQU        $0008
  97. kFSMGetCatInfo                    EQU        $0009
  98. kFSMSetCatInfo                    EQU        $000A
  99. kFSMSetVolInfo                    EQU        $000B
  100. kFSMLockRng                        EQU        $0010
  101. kFSMUnlockRng                    EQU        $0011
  102. kFSMCreateFileIDRef                EQU        $0014
  103. kFSMDeleteFileIDRef                EQU        $0015
  104. kFSMResolveFileIDRef            EQU        $0016
  105. kFSMExchangeFiles                EQU        $0017
  106. kFSMCatSearch                    EQU        $0018
  107. kFSMOpenDF                        EQU        $001A
  108. kFSMMakeFSSpec                    EQU        $001B
  109. ;    The Desktop Manager HFSDispatch selectCodes 
  110. kFSMDTGetPath                    EQU        $0020
  111. kFSMDTCloseDown                    EQU        $0021
  112. kFSMDTAddIcon                    EQU        $0022
  113. kFSMDTGetIcon                    EQU        $0023
  114. kFSMDTGetIconInfo                EQU        $0024
  115. kFSMDTAddAPPL                    EQU        $0025
  116. kFSMDTRemoveAPPL                EQU        $0026
  117. kFSMDTGetAPPL                    EQU        $0027
  118. kFSMDTSetComment                EQU        $0028
  119. kFSMDTRemoveComment                EQU        $0029
  120. kFSMDTGetComment                EQU        $002A
  121. kFSMDTFlush                        EQU        $002B
  122. kFSMDTReset                        EQU        $002C
  123. kFSMDTGetInfo                    EQU        $002D
  124. kFSMDTOpenInform                EQU        $002E
  125. kFSMDTDelete                    EQU        $002F
  126. ;    The AppleShare HFSDispatch selectCodes 
  127. kFSMGetVolParms                    EQU        $0030
  128. kFSMGetLogInInfo                EQU        $0031
  129. kFSMGetDirAccess                EQU        $0032
  130. kFSMSetDirAccess                EQU        $0033
  131. kFSMMapID                        EQU        $0034
  132. kFSMMapName                        EQU        $0035
  133. kFSMCopyFile                    EQU        $0036
  134. kFSMMoveRename                    EQU        $0037
  135. kFSMOpenDeny                    EQU        $0038
  136. kFSMOpenRFDeny                    EQU        $0039
  137. kFSMGetXCatInfo                    EQU        $003A
  138. kFSMGetVolMountInfoSize            EQU        $003F
  139. kFSMGetVolMountInfo                EQU        $0040
  140. kFSMVolumeMount                    EQU        $0041
  141. kFSMShare                        EQU        $0042
  142. kFSMUnShare                        EQU        $0043
  143. kFSMGetUGEntry                    EQU        $0044
  144. kFSMGetForeignPrivs                EQU        $0060
  145. kFSMSetForeignPrivs                EQU        $0061
  146.  
  147. ;
  148. ; * UTDetermineVol status values
  149. dtmvError                        EQU        0                    ; param error 
  150. dtmvFullPathame                    EQU        1                    ; determined by full pathname 
  151. dtmvVRefNum                        EQU        2                    ; determined by volume refNum 
  152. dtmvWDRefNum                    EQU        3                    ; determined by working directory refNum 
  153. dtmvDriveNum                    EQU        4                    ; determined by drive number 
  154. dtmvDefault                        EQU        5                    ; determined by default volume 
  155.  
  156. ;
  157. ; * UTGetBlock options
  158. gbDefault                        EQU        0                    ; default value - read if not found 
  159. ;    bits and masks 
  160. gbReadBit                        EQU        0                    ; read block from disk (forced read) 
  161. gbReadMask                        EQU        $0001
  162. gbExistBit                        EQU        1                    ; get existing cache block 
  163. gbExistMask                        EQU        $0002
  164. gbNoReadBit                        EQU        2                    ; don't read block from disk if not found in cache 
  165. gbNoReadMask                    EQU        $0004
  166. gbReleaseBit                    EQU        3                    ; release block immediately after GetBlock 
  167. gbReleaseMask                    EQU        $0008
  168.  
  169. ;
  170. ; * UTReleaseBlock options
  171. rbDefault                        EQU        0                    ; default value - just mark the buffer not in-use 
  172. ;    bits and masks 
  173. rbWriteBit                        EQU        0                    ; force write buffer to disk 
  174. rbWriteMask                        EQU        $0001
  175. rbTrashBit                        EQU        1                    ; trash buffer contents after release 
  176. rbTrashMask                        EQU        $0002
  177. rbDirtyBit                        EQU        2                    ; mark buffer dirty 
  178. rbDirtyMask                        EQU        $0004
  179. rbFreeBit                        EQU        3                    ; free the buffer (save in the hash) 
  180. ;
  181. ; *    rbFreeMask (rbFreeBit + rbTrashBit) works as rbTrash on < System 7.0 RamCache;
  182. ; *    on >= System 7.0, rbfreeMask overrides rbTrash
  183. rbFreeMask                        EQU        $000A
  184.  
  185. ;
  186. ; * UTFlushCache options
  187. fcDefault                        EQU        0                    ; default value - just flush any dirty buffers 
  188. ;    bits and masks 
  189. fcTrashBit                        EQU        1                    ; trash buffers after flushing 
  190. fcTrashMask                        EQU        $0002
  191. fcFreeBit                        EQU        3                    ; free buffers after flushing 
  192. fcFreeMask                        EQU        $0008                ; fcFreeMask works as fcTrash on < System 7.0 RamCache 
  193.  
  194. ;
  195. ; * UTCacheReadIP and UTCacheWriteIP cacheOption
  196. noCacheBit                        EQU        5                    ; don't cache this please 
  197. noCacheMask                        EQU        $0020
  198. rdVerifyBit                        EQU        6                    ; read verify 
  199. rdVerifyMask                    EQU        $0040
  200.  
  201. ;
  202. ; * Cache routine internal error codes
  203. chNoBuf                            EQU        1                    ; no free cache buffers (all in use) 
  204. chInUse                            EQU        2                    ; requested block in use 
  205. chnotfound                        EQU        3                    ; requested block not found 
  206. chNotInUse                        EQU        4                    ; block being released was not in use 
  207.  
  208. ;
  209. ; * FCBRec.fcbFlags bits
  210. fcbWriteBit                        EQU        0                    ; Data can be written to this file 
  211. fcbWriteMask                    EQU        $01
  212. fcbResourceBit                    EQU        1                    ; This file is a resource fork 
  213. fcbResourceMask                    EQU        $02
  214. fcbWriteLockedBit                EQU        2                    ; File has a locked byte range 
  215. fcbWriteLockedMask                EQU        $04
  216. fcbSharedWriteBit                EQU        4                    ; File is open for shared write access 
  217. fcbSharedWriteMask                EQU        $10
  218. fcbFileLockedBit                EQU        5                    ; File is locked (write-protected) 
  219. fcbFileLockedMask                EQU        $20
  220. fcbOwnClumpBit                    EQU        6                    ; File has clump size specified in FCB 
  221. fcbOwnClumpMask                    EQU        $40
  222. fcbModifiedBit                    EQU        7                    ; File has changed since it was last flushed 
  223. fcbModifiedMask                    EQU        $80
  224.  
  225. ;
  226. ; * ExtFileProc options
  227. extendFileAllBit                EQU        0                    ; allocate all requested bytes or none 
  228. extendFileAllMask                EQU        $0001
  229. extendFileContigBit                EQU        1                    ; force contiguous allocation 
  230. extendFileContigMask            EQU        $0002
  231.  
  232. ;
  233. ; *    HFS Component Interface constants
  234. ;
  235. ; * compInterfMask bits specific to HFS component
  236. hfsCIDoesHFSBit                    EQU        23                    ; set if file system supports HFS calls 
  237. hfsCIDoesHFSMask                EQU        $00800000
  238. hfsCIDoesAppleShareBit            EQU        22                    ; set if AppleShare calls supported 
  239. hfsCIDoesAppleShareMask            EQU        $00400000
  240. hfsCIDoesDeskTopBit                EQU        21                    ; set if Desktop Database calls supported 
  241. hfsCIDoesDeskTopMask            EQU        $00200000
  242. hfsCIDoesDynamicLoadBit            EQU        20                    ; set if dynamically loading code resource 
  243. hfsCIDoesDynamicLoadMask        EQU        $00100000            ;        supported 
  244. hfsCIResourceLoadedBit            EQU        19                    ; set if code resource already loaded 
  245. hfsCIResourceLoadedMask            EQU        $00080000
  246. hfsCIHasHLL2PProcBit            EQU        18                    ; set if FFS' log2PhyProc and Extendfile proc 
  247. hfsCIHasHLL2PProcMask            EQU        $00040000            ; is written in a high level language. (i.e., uses Pascal calling convention) 
  248.  
  249. ;
  250. ; *    Disk Initialization Component Interface constants
  251. ;
  252. ; * compInterfMask bits specific to Disk Initialization component
  253. diCIHasExtFormatParamsBit        EQU        18                    ; set if file system needs extended format 
  254. diCIHasExtFormatParamsMask        EQU        $00040000            ;        parameters 
  255. diCIHasMultiVolTypesBit            EQU        17                    ; set if file system supports more than one 
  256. diCIHasMultiVolTypesMask        EQU        $00020000            ;        volume type 
  257. diCIDoesSparingBit                EQU        16                    ; set if file system supports disk sparing 
  258. diCIDoesSparingMask                EQU        $00010000
  259. diCILiveBit                        EQU        0                    ; set if file system is candidate for current 
  260. diCILiveMask                    EQU        $00000001            ;        formatting operation (set by PACK2) 
  261.  
  262. ;
  263. ; * Disk Initialization Component Function selectors
  264. diCILoad                        EQU        1                    ; Make initialization code memory resident 
  265. diCIUnload                        EQU        2                    ; Make initialization code purgeable 
  266. diCIEvaluateSizeChoices            EQU        3                    ; Evaluate size choices 
  267. diCIExtendedZero                EQU        4                    ; Write an empty volume directory 
  268. diCIValidateVolName                EQU        5                    ; Validate volume name 
  269. diCIGetVolTypeInfo                EQU        6                    ; get volume type info 
  270. diCIGetFormatString                EQU        7                    ; get dialog format string 
  271. diCIGetExtFormatParams            EQU        8                    ; get extended format parameters 
  272. diCIGetDefectList                EQU        9                    ; return the defect list for the indicated disk - reserved for future use 
  273.  
  274. ;
  275. ; * Constants used in the DICIEvaluateSizeRec and FormatListRec
  276. diCIFmtListMax                    EQU        8                    ; maximum number of format list entries in DICIEvaluateSizeRec.numSizeEntries 
  277. ;    bits in FormatListRec.formatFlags: 
  278. diCIFmtFlagsValidBit            EQU        7                    ; set if sec, side, tracks valid 
  279. diCIFmtFlagsValidMask            EQU        $80
  280. diCIFmtFlagsCurrentBit            EQU        6                    ; set if current disk has this fmt 
  281. diCIFmtFlagsCurrentMask            EQU        $40
  282. ;    bits in FormatListRec.sizeListFlags: 
  283. diCISizeListOKBit                EQU        15                    ; set if this disk size usable 
  284. diCISizeListOKMask                EQU        $8000
  285.  
  286. ;
  287. ; * DICIGetFormatStringRec.stringKind format strings
  288. diCIAlternateFormatStr            EQU        1                    ; get alternate format  string (Balloon Help) 
  289. diCISizePresentationStr            EQU        2                    ; get size presentation string (for dialog) 
  290.  
  291. ;
  292. ; * Error codes returned by Disk Sparing
  293. diCIUserCancelErr                EQU        1                    ; user cancelled the disk init 
  294. diCICriticalSectorBadErr        EQU        20                    ; critical sectors are bad (hopeless)    
  295. diCISparingFailedErr            EQU        21                    ; disk cannot be spared 
  296. diCITooManyBadSectorsErr        EQU        22                    ; too many bad sectors 
  297. diCIUnknownVolTypeErr            EQU        23                    ; the volume type passed in diCIExtendedZero paramBlock is not supported 
  298. diCIVolSizeMismatchErr            EQU        24                    ; specified volume size doesn’t match with formatted disk size 
  299. diCIUnknownDICallErr            EQU        25                    ; bogus DI function call selector 
  300. diCINoSparingErr                EQU        26                    ; disk is bad but the target FS doesn't do disk sparing 
  301. diCINoExtendInfoErr                EQU        27                    ; missing file system specific extra parameter in diCIExtendedZero call 
  302. diCINoMessageTextErr            EQU        28                    ; missing message text in DIReformat call 
  303.  
  304. ;
  305. ; *    File System Manager constants
  306. ;
  307. ; * Miscellaneous constants used by FSM
  308. fsdVersion1                        EQU        1                    ; current version of FSD record 
  309. fsmIgnoreFSID                    EQU        $fffe                ; this FSID should be ignored by the driver 
  310. fsmGenericFSID                    EQU        $ffff                ; unknown foreign file system ID 
  311.  
  312. ;
  313. ; * compInterfMask bits common to all FSM components
  314. fsmComponentEnableBit            EQU        31                    ; set if FSM component interface is enabled 
  315. fsmComponentEnableMask            EQU        $80000000
  316. fsmComponentBusyBit                EQU        30                    ; set if FSM component interface is busy 
  317. fsmComponentBusyMask            EQU        $40000000
  318.  
  319. ;
  320. ; * Selectors for GetFSInfo
  321. fsmGetFSInfoByIndex                EQU        -1                    ; get fs info by index 
  322. fsmGetFSInfoByFSID                EQU        0                    ; get fs info by FSID 
  323. fsmGetFSInfoByRefNum            EQU        1                    ; get fs info by file/vol refnum 
  324.  
  325. ;
  326. ; * InformFSM messages
  327. fsmNopMessage                    EQU        0                    ; nop 
  328. fsmDrvQElChangedMessage            EQU        1                    ; DQE has changed 
  329. fsmGetFSIconMessage                EQU        2                    ; Get FFS's disk icon 
  330.  
  331. ;
  332. ; * Messages passed to the fileSystemCommProc
  333. ffsNopMessage                    EQU        0                    ; nop, should always return noErr 
  334. ffsGetIconMessage                EQU        1                    ; return disk icon and mask 
  335. ffsIDDiskMessage                EQU        2                    ; identify the about-to-be-mounted volume 
  336. ffsLoadMessage                    EQU        3                    ; load in the FFS 
  337. ffsUnloadMessage                EQU        4                    ; unload the FFS 
  338. ffsIDVolMountMessage            EQU        5                    ; identify a VolMountInfo record 
  339. ffsInformMessage                EQU        6                    ; FFS defined message 
  340. ffsGetIconInfoMessage            EQU        7
  341.  
  342. ;
  343. ; * Error codes from FSM functions
  344. fsmFFSNotFoundErr                EQU        -431                ; Foreign File system does not exist - new Pack2 could return this error too 
  345. fsmBusyFFSErr                    EQU        -432                ; File system is busy, cannot be removed 
  346. fsmBadFFSNameErr                EQU        -433                ; Name length not 1 <= length <= 31 
  347. fsmBadFSDLenErr                    EQU        -434                ; FSD size incompatible with current FSM vers 
  348. fsmDuplicateFSIDErr                EQU        -435                ; FSID already exists on InstallFS 
  349. fsmBadFSDVersionErr                EQU        -436                ; FSM version incompatible with FSD 
  350. fsmNoAlternateStackErr            EQU        -437                ; no alternate stack for HFS CI 
  351. fsmUnknownFSMMessageErr            EQU        -438                ; unknown message passed to FSM 
  352.  
  353. ;
  354. ; *    HFS Utility routine records
  355. ;
  356. ; * record used by UTGetPathComponentName
  357. ParsePathRec             RECORD    0
  358. namePtr                     ds.l    1                                    ; pathname to parse 
  359. startOffset                 ds.w    1                                    ; where to start parsing 
  360. componentLength             ds.w    1                                    ; the length of the pathname component parsed 
  361. moreName                 ds.b    1                                    ; non-zero if there are more components after this one 
  362. foundDelimiter             ds.b    1                                    ; non-zero if parsing stopped because a colon (:) delimiter was found 
  363. sizeof                     EQU    10
  364.                         ENDR
  365.  
  366. WDCBRec                 RECORD    0
  367. wdVCBPtr                 ds.l    1                                    ; Pointer to VCB of this working directory 
  368. wdDirID                     ds.l    1                                    ; Directory ID number of this working directory 
  369. wdCatHint                 ds.l    1                                    ; Hint for finding this working directory 
  370. wdProcID                 ds.l    1                                    ; Process that created this working directory 
  371. sizeof                     EQU    16
  372.                         ENDR
  373.  
  374. FCBRec                     RECORD    0
  375. fcbFlNm                     ds.l    1                                    ; FCB file number. Non-zero marks FCB used 
  376. fcbFlags                 ds.b    1                                    ; FCB flags 
  377. fcbTypByt                 ds.b    1                                    ; File type byte 
  378. fcbSBlk                     ds.w    1                                    ; File start block (in alloc size blks) 
  379. fcbEOF                     ds.l    1                                    ; Logical length or EOF in bytes 
  380. fcbPLen                     ds.l    1                                    ; Physical file length in bytes 
  381. fcbCrPs                     ds.l    1                                    ; Current position within file 
  382. fcbVPtr                     ds.l    1                                    ; Pointer to the corresponding VCB 
  383. fcbBfAdr                 ds.l    1                                    ; File's buffer address 
  384. fcbFlPos                 ds.w    1                                    ; Directory block this file is in 
  385. ; FCB Extensions for HFS 
  386. fcbClmpSize                 ds.l    1                                    ; Number of bytes per clump 
  387. fcbBTCBPtr                 ds.l    1                                    ; Pointer to B*-Tree control block for file 
  388. fcbExtRec                 ds.l    3                                    ; First 3 file extents 
  389. fcbFType                 ds.l    1                                    ; File's 4 Finder Type bytes 
  390. fcbCatPos                 ds.l    1                                    ; Catalog hint for use on Close 
  391. fcbDirID                 ds.l    1                                    ; Parent Directory ID 
  392. fcbCName                 ds.l    8                                    ; CName of open file 
  393. sizeof                     EQU    94
  394.                         ENDR
  395.  
  396. ;
  397. ; *    HFS Component Interface records
  398. HFSCIRec                 RECORD    0
  399. compInterfMask             ds.l    1                                    ; component flags 
  400. compInterfProc             ds.l    1                                    ; pointer to file system call processing code 
  401. log2PhyProc                 ds.l    1                                    ; pointer to Lg2PhysProc() code 
  402. stackTop                 ds.l    1                                    ; file system stack top 
  403. stackSize                 ds.l    1                                    ; file system stack size 
  404. stackPtr                 ds.l    1                                    ; current file system stack pointer 
  405. reserved3                 ds.l    1                                    ; --reserved, must be zero-- 
  406. idSector                 ds.l    1                                    ; Sector you need to ID a local volume. For networked volumes, this must be -1 
  407. reserved2                 ds.l    1                                    ; --reserved, must be zero-- 
  408. reserved1                 ds.l    1                                    ; --reserved, must be zero-- 
  409. sizeof                     EQU    40
  410.                         ENDR
  411.  
  412. ;
  413. ; *    Disk Initialization Component Interface records
  414. DICIRec                 RECORD    0
  415. compInterfMask             ds.l    1                                    ; component flags 
  416. compInterfProc             ds.l    1                                    ; pointer to call processing code 
  417. maxVolNameLength         ds.w    1                                    ; maximum length of your volume name 
  418. blockSize                 ds.w    1                                    ; your file system's block size 
  419. reserved3                 ds.l    1                                    ; --reserved, must be zero-- 
  420. reserved2                 ds.l    1                                    ; --reserved, must be zero-- 
  421. reserved1                 ds.l    1                                    ; --reserved, must be zero-- 
  422. sizeof                     EQU    24
  423.                         ENDR
  424.  
  425. ;
  426. ; * FormatListRec as returned by the .Sony disk driver's
  427. ; * Return Format List status call (csCode = 6).
  428. ; * If the status call to get this list for a drive is not
  429. ; * implemented by the driver, then a list with one entry
  430. ; * is contructed from the drive queue element for the drive.
  431. FormatListRec             RECORD    0
  432. volSize                     ds.l    1                                    ; disk capacity in SECTORs 
  433. formatFlags                 ds.b    1                                    ; flags 
  434. sectorsPerTrack             ds.b    1                                    ; sectors per track side 
  435. tracks                     ds.w    1                                    ; number of tracks 
  436. sizeof                     EQU    8
  437.                         ENDR
  438.  
  439. ;
  440. ; * SizeListRec built from FormatListRecs as described above.
  441. SizeListRec             RECORD    0
  442. sizeListFlags             ds.w    1                                    ; flags as set by external file system 
  443. sizeEntry                 ds        FormatListRec                        ; disk driver format list record 
  444. sizeof                     EQU    10
  445.                         ENDR
  446.  
  447. ;
  448. ; * paramBlock for the diCIEvaluateSize call
  449. DICIEvaluateSizeRec     RECORD    0
  450. defaultSizeIndex         ds.w    1                                    ; default size for this FS 
  451. numSizeEntries             ds.w    1                                    ; number of size entries 
  452. driveNumber                 ds.w    1                                    ; drive number 
  453. sizeListPtr                 ds.l    1                                    ; ptr to size entry table 
  454. sectorSize                 ds.w    1                                    ; bytes per sector 
  455. sizeof                     EQU    12
  456.                         ENDR
  457.  
  458. ;
  459. ; * paramBlock for the diCIExtendedZero call
  460. DICIExtendedZeroRec     RECORD    0
  461. driveNumber                 ds.w    1                                    ; drive number 
  462. volNamePtr                 ds.l    1                                    ; ptr to volume name string 
  463. fsid                     ds.w    1                                    ; file system ID 
  464. volTypeSelector             ds.w    1                                    ; volume type selector, if supports more than 1 type 
  465. numDefectBlocks             ds.w    1                                    ; number of bad logical blocks 
  466. defectListSize             ds.w    1                                    ; size of the defect list buffer in bytes 
  467. defectListPtr             ds.l    1                                    ; pointer to defect list buffer 
  468. volSize                     ds.l    1                                    ; size of volume in SECTORs 
  469. sectorSize                 ds.w    1                                    ; bytes per sector 
  470. extendedInfoPtr             ds.l    1                                    ; ptr to extended info 
  471. sizeof                     EQU    28
  472.                         ENDR
  473.  
  474. ;
  475. ; * paramBlock for the diCIValidateVolName call
  476. DICIValidateVolNameRec     RECORD    0
  477. theChar                     ds.b    1                                    ; the character to validate 
  478. hasMessageBuffer         ds.b    1                                    ; false if no message 
  479. charOffset                 ds.w    1                                    ; position of the current character (first char = 1) 
  480. messageBufferPtr         ds.l    1                                    ; pointer to message buffer or nil 
  481. charByteType             ds.w    1                                    ; theChar's byte type (smSingleByte, smFirstByte, or smLastByte) 
  482. sizeof                     EQU    10
  483.                         ENDR
  484.  
  485. ;
  486. ; * paramBlock for the diCIGetVolTypeInfo call
  487. DICIGetVolTypeInfoRec     RECORD    0
  488. volSize                     ds.l    1                                    ; size of volume in SECTORs 
  489. sectorSize                 ds.w    1                                    ; bytes per sector 
  490. numVolTypes                 ds.w    1                                    ; number of volume types supported 
  491. volTypesBuffer             ds.b    132                                ; 4 string buffers 
  492. sizeof                     EQU    140
  493.                         ENDR
  494.  
  495. ;
  496. ; * paramBlock for the diCIGetFormatString call
  497. DICIGetFormatStringRec     RECORD    0
  498. volSize                     ds.l    1                                    ; volume size in SECTORs 
  499. sectorSize                 ds.w    1                                    ; sector size 
  500. volTypeSelector             ds.w    1                                    ; volume type selector 
  501. stringKind                 ds.w    1                                    ; sub-function = type of string 
  502. stringBuffer             ds.l    64                                ; string buffer 
  503. sizeof                     EQU    266
  504.                         ENDR
  505.  
  506. ;
  507. ; * paramBlock for the diCIGetExtendedFormatParams call
  508. DICIGetExtendedFormatRec RECORD    0
  509. driveNumber                 ds.w    1                                    ; drive number 
  510. volTypeSelector             ds.w    1                                    ; volume type selector or 0 
  511. volSize                     ds.l    1                                    ; size of volume in SECTORs 
  512. sectorSize                 ds.w    1                                    ; bytes per sector 
  513. fileSystemSpecPtr         ds.l    1                                    ; pointer to the foreign file system's FSSpec 
  514. extendedInfoPtr             ds.l    1                                    ; pointer to extended parameter structure 
  515. sizeof                     EQU    18
  516.                         ENDR
  517.  
  518. ;
  519. ; *    File System Manager records
  520. FSDRec                     RECORD    0
  521. fsdLink                     ds.l    1                                    ; ptr to next 
  522. fsdLength                 ds.w    1                                    ; length of this FSD in BYTES 
  523. fsdVersion                 ds.w    1                                    ; version number 
  524. fileSystemFSID             ds.w    1                                    ; file system id 
  525. fileSystemName             ds.l    8                                    ; file system name 
  526. fileSystemSpec             ds        FSSpec                                ; foreign file system's FSSpec 
  527. fileSystemGlobalsPtr     ds.l    1                                    ; ptr to file system globals 
  528. fileSystemCommProc         ds.l    1                                    ; communication proc with the FFS 
  529. reserved3                 ds.l    1                                    ; --reserved, must be zero-- 
  530. reserved2                 ds.l    1                                    ; --reserved, must be zero-- 
  531. reserved1                 ds.l    1                                    ; --reserved, must be zero-- 
  532. fsdHFSCI                 ds        HFSCIRec                            ; HFS component interface    
  533. fsdDICI                     ds        DICIRec                            ; Disk Initialization component interface 
  534. sizeof                     EQU    196
  535.                         ENDR
  536.  
  537. FSMGetIconInfoRec         RECORD    0
  538. theIcon                     ds.l    32                                ; The ICN# structure 
  539. theMask                     ds.l    32                                ; The mask for the icon above 
  540. whereStr                 ds.l    64
  541. sizeof                     EQU    512
  542.                         ENDR
  543.  
  544. ;
  545. ; * paramBlock for ffsGetIconMessage and fsmGetFSIconMessage
  546. FSMGetIconRec             RECORD    0
  547. refNum                     ds.w    1                                    ; target drive num or volume refnum 
  548. iconBufferPtr             ds.l    1                                    ; pointer to icon buffer 
  549. requestSize                 ds.l    1                                    ; requested size of the icon buffer 
  550. actualSize                 ds.l    1                                    ; actual size of the icon data returned 
  551. iconType                 ds.b    1                                    ; kind of icon 
  552. isEjectable                 ds.b    1                                    ; true if the device is ejectable 
  553. driveQElemPtr             ds.l    1                                    ; pointer to DQE 
  554. fileSystemSpecPtr         ds.l    1                                    ; pointer to foreign file system's FSSpec 
  555. reserved1                 ds.l    1                                    ; --reserved, must be zero-- 
  556. sizeof                     EQU    28
  557.                         ENDR
  558.  
  559. ;
  560. ; *    HFS Utility routine prototypes
  561.     IF GENERATING68K THEN
  562.         Macro
  563.         _UTAllocateFCB
  564.             moveq    #0,d0
  565.             dc.w     $A824
  566.         EndM
  567.     ELSE
  568.         IMPORT    UTAllocateFCB
  569.     ENDIF
  570.  
  571.     IF GENERATING68K THEN
  572.         Macro
  573.         _UTReleaseFCB
  574.             moveq    #1,d0
  575.             dc.w     $A824
  576.         EndM
  577.     ELSE
  578.         IMPORT    UTReleaseFCB
  579.     ENDIF
  580.  
  581.     IF GENERATING68K THEN
  582.         Macro
  583.         _UTLocateFCB
  584.             moveq    #2,d0
  585.             dc.w     $A824
  586.         EndM
  587.     ELSE
  588.         IMPORT    UTLocateFCB
  589.     ENDIF
  590.  
  591.     IF GENERATING68K THEN
  592.         Macro
  593.         _UTLocateNextFCB
  594.             moveq    #3,d0
  595.             dc.w     $A824
  596.         EndM
  597.     ELSE
  598.         IMPORT    UTLocateNextFCB
  599.     ENDIF
  600.  
  601.     IF GENERATING68K THEN
  602.         Macro
  603.         _UTIndexFCB
  604.             moveq    #4,d0
  605.             dc.w     $A824
  606.         EndM
  607.     ELSE
  608.         IMPORT    UTIndexFCB
  609.     ENDIF
  610.  
  611.     IF GENERATING68K THEN
  612.         Macro
  613.         _UTResolveFCB
  614.             moveq    #5,d0
  615.             dc.w     $A824
  616.         EndM
  617.     ELSE
  618.         IMPORT    UTResolveFCB
  619.     ENDIF
  620.  
  621.     IF GENERATING68K THEN
  622.         Macro
  623.         _UTAllocateVCB
  624.             moveq    #6,d0
  625.             dc.w     $A824
  626.         EndM
  627.     ELSE
  628.         IMPORT    UTAllocateVCB
  629.     ENDIF
  630.  
  631.     IF GENERATING68K THEN
  632.         Macro
  633.         _UTAddNewVCB
  634.             moveq    #7,d0
  635.             dc.w     $A824
  636.         EndM
  637.     ELSE
  638.         IMPORT    UTAddNewVCB
  639.     ENDIF
  640.  
  641.     IF GENERATING68K THEN
  642.         Macro
  643.         _UTDisposeVCB
  644.             moveq    #8,d0
  645.             dc.w     $A824
  646.         EndM
  647.     ELSE
  648.         IMPORT    UTDisposeVCB
  649.     ENDIF
  650.  
  651.     IF GENERATING68K THEN
  652.         Macro
  653.         _UTLocateVCBByRefNum
  654.             moveq    #9,d0
  655.             dc.w     $A824
  656.         EndM
  657.     ELSE
  658.         IMPORT    UTLocateVCBByRefNum
  659.     ENDIF
  660.  
  661.     IF GENERATING68K THEN
  662.         Macro
  663.         _UTLocateVCBByName
  664.             moveq    #10,d0
  665.             dc.w     $A824
  666.         EndM
  667.     ELSE
  668.         IMPORT    UTLocateVCBByName
  669.     ENDIF
  670.  
  671.     IF GENERATING68K THEN
  672.         Macro
  673.         _UTLocateNextVCB
  674.             moveq    #11,d0
  675.             dc.w     $A824
  676.         EndM
  677.     ELSE
  678.         IMPORT    UTLocateNextVCB
  679.     ENDIF
  680.  
  681.     IF GENERATING68K THEN
  682.         Macro
  683.         _UTAllocateWDCB
  684.             moveq    #12,d0
  685.             dc.w     $A824
  686.         EndM
  687.     ELSE
  688.         IMPORT    UTAllocateWDCB
  689.     ENDIF
  690.  
  691.     IF GENERATING68K THEN
  692.         Macro
  693.         _UTReleaseWDCB
  694.             moveq    #13,d0
  695.             dc.w     $A824
  696.         EndM
  697.     ELSE
  698.         IMPORT    UTReleaseWDCB
  699.     ENDIF
  700.  
  701.     IF GENERATING68K THEN
  702.         Macro
  703.         _UTResolveWDCB
  704.             moveq    #14,d0
  705.             dc.w     $A824
  706.         EndM
  707.     ELSE
  708.         IMPORT    UTResolveWDCB
  709.     ENDIF
  710.  
  711.     IF GENERATING68K THEN
  712.         Macro
  713.         _UTFindDrive
  714.             moveq    #15,d0
  715.             dc.w     $A824
  716.         EndM
  717.     ELSE
  718.         IMPORT    UTFindDrive
  719.     ENDIF
  720.  
  721.     IF GENERATING68K THEN
  722.         Macro
  723.         _UTAdjustEOF
  724.             moveq    #16,d0
  725.             dc.w     $A824
  726.         EndM
  727.     ELSE
  728.         IMPORT    UTAdjustEOF
  729.     ENDIF
  730.  
  731.     IF GENERATING68K THEN
  732.         Macro
  733.         _UTSetDefaultVol
  734.             moveq    #17,d0
  735.             dc.w     $A824
  736.         EndM
  737.     ELSE
  738.         IMPORT    UTSetDefaultVol
  739.     ENDIF
  740.  
  741.     IF GENERATING68K THEN
  742.         Macro
  743.         _UTGetDefaultVol
  744.             moveq    #18,d0
  745.             dc.w     $A824
  746.         EndM
  747.     ELSE
  748.         IMPORT    UTGetDefaultVol
  749.     ENDIF
  750.  
  751.     IF GENERATING68K THEN
  752.         Macro
  753.         _UTEjectVol
  754.             moveq    #43,d0
  755.             dc.w     $A824
  756.         EndM
  757.     ELSE
  758.         IMPORT    UTEjectVol
  759.     ENDIF
  760.  
  761.     IF GENERATING68K THEN
  762.         Macro
  763.         _UTCheckWDRefNum
  764.             moveq    #19,d0
  765.             dc.w     $A824
  766.         EndM
  767.     ELSE
  768.         IMPORT    UTCheckWDRefNum
  769.     ENDIF
  770.  
  771.     IF GENERATING68K THEN
  772.         Macro
  773.         _UTCheckFileRefNum
  774.             moveq    #20,d0
  775.             dc.w     $A824
  776.         EndM
  777.     ELSE
  778.         IMPORT    UTCheckFileRefNum
  779.     ENDIF
  780.  
  781.     IF GENERATING68K THEN
  782.         Macro
  783.         _UTCheckVolRefNum
  784.             moveq    #21,d0
  785.             dc.w     $A824
  786.         EndM
  787.     ELSE
  788.         IMPORT    UTCheckVolRefNum
  789.     ENDIF
  790.  
  791.     IF GENERATING68K THEN
  792.         Macro
  793.         _UTCheckPermission
  794.             moveq    #22,d0
  795.             dc.w     $A824
  796.         EndM
  797.     ELSE
  798.         IMPORT    UTCheckPermission
  799.     ENDIF
  800.  
  801.     IF GENERATING68K THEN
  802.         Macro
  803.         _UTCheckVolOffline
  804.             moveq    #23,d0
  805.             dc.w     $A824
  806.         EndM
  807.     ELSE
  808.         IMPORT    UTCheckVolOffline
  809.     ENDIF
  810.  
  811.     IF GENERATING68K THEN
  812.         Macro
  813.         _UTCheckVolModifiable
  814.             moveq    #24,d0
  815.             dc.w     $A824
  816.         EndM
  817.     ELSE
  818.         IMPORT    UTCheckVolModifiable
  819.     ENDIF
  820.  
  821.     IF GENERATING68K THEN
  822.         Macro
  823.         _UTCheckFileModifiable
  824.             moveq    #25,d0
  825.             dc.w     $A824
  826.         EndM
  827.     ELSE
  828.         IMPORT    UTCheckFileModifiable
  829.     ENDIF
  830.  
  831.     IF GENERATING68K THEN
  832.         Macro
  833.         _UTCheckDirBusy
  834.             moveq    #26,d0
  835.             dc.w     $A824
  836.         EndM
  837.     ELSE
  838.         IMPORT    UTCheckDirBusy
  839.     ENDIF
  840.  
  841.     IF GENERATING68K THEN
  842.         Macro
  843.         _UTParsePathname
  844.             moveq    #27,d0
  845.             dc.w     $A824
  846.         EndM
  847.     ELSE
  848.         IMPORT    UTParsePathname
  849.     ENDIF
  850.  
  851.     IF GENERATING68K THEN
  852.         Macro
  853.         _UTGetPathComponentName
  854.             moveq    #28,d0
  855.             dc.w     $A824
  856.         EndM
  857.     ELSE
  858.         IMPORT    UTGetPathComponentName
  859.     ENDIF
  860.  
  861.     IF GENERATING68K THEN
  862.         Macro
  863.         _UTDetermineVol
  864.             moveq    #29,d0
  865.             dc.w     $A824
  866.         EndM
  867.     ELSE
  868.         IMPORT    UTDetermineVol
  869.     ENDIF
  870.  
  871.     IF GENERATING68K THEN
  872.         Macro
  873.         _UTGetBlock
  874.             moveq    #31,d0
  875.             dc.w     $A824
  876.         EndM
  877.     ELSE
  878.         IMPORT    UTGetBlock
  879.     ENDIF
  880.  
  881.     IF GENERATING68K THEN
  882.         Macro
  883.         _UTReleaseBlock
  884.             moveq    #32,d0
  885.             dc.w     $A824
  886.         EndM
  887.     ELSE
  888.         IMPORT    UTReleaseBlock
  889.     ENDIF
  890.  
  891.     IF GENERATING68K THEN
  892.         Macro
  893.         _UTFlushCache
  894.             moveq    #33,d0
  895.             dc.w     $A824
  896.         EndM
  897.     ELSE
  898.         IMPORT    UTFlushCache
  899.     ENDIF
  900.  
  901.     IF GENERATING68K THEN
  902.         Macro
  903.         _UTMarkDirty
  904.             moveq    #35,d0
  905.             dc.w     $A824
  906.         EndM
  907.     ELSE
  908.         IMPORT    UTMarkDirty
  909.     ENDIF
  910.  
  911.     IF GENERATING68K THEN
  912.         Macro
  913.         _UTTrashVolBlocks
  914.             moveq    #36,d0
  915.             dc.w     $A824
  916.         EndM
  917.     ELSE
  918.         IMPORT    UTTrashVolBlocks
  919.     ENDIF
  920.  
  921.     IF GENERATING68K THEN
  922.         Macro
  923.         _UTTrashFileBlocks
  924.             moveq    #37,d0
  925.             dc.w     $A824
  926.         EndM
  927.     ELSE
  928.         IMPORT    UTTrashFileBlocks
  929.     ENDIF
  930.  
  931.     IF GENERATING68K THEN
  932.         Macro
  933.         _UTTrashBlocks
  934.             moveq    #38,d0
  935.             dc.w     $A824
  936.         EndM
  937.     ELSE
  938.         IMPORT    UTTrashBlocks
  939.     ENDIF
  940.  
  941.     IF GENERATING68K THEN
  942.         Macro
  943.         _UTCacheReadIP
  944.             moveq    #39,d0
  945.             dc.w     $A824
  946.         EndM
  947.     ELSE
  948.         IMPORT    UTCacheReadIP
  949.     ENDIF
  950.  
  951.     IF GENERATING68K THEN
  952.         Macro
  953.         _UTCacheWriteIP
  954.             moveq    #40,d0
  955.             dc.w     $A824
  956.         EndM
  957.     ELSE
  958.         IMPORT    UTCacheWriteIP
  959.     ENDIF
  960.  
  961.     IF GENERATING68K THEN
  962.         Macro
  963.         _UTBlockInFQHashP
  964.             moveq    #44,d0
  965.             dc.w     $A824
  966.         EndM
  967.     ELSE
  968.         IMPORT    UTBlockInFQHashP
  969.     ENDIF
  970.  
  971. ;
  972. ; *    File System Manager call prototypes
  973.     ENDIF ; __FSM__
  974.